package com.zero.mxshengadmin.modules.website.dao;

import com.baomidou.mybatisplus.mapper.BaseMapper;
import com.zero.mxshengadmin.modules.website.entity.WebsiteQuestionEntity;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;
import java.util.Map;

/**
 * Created by aicaikeji on 2019/4/3.
 */
@Mapper
public interface WebsiteQuestionDao extends BaseMapper<WebsiteQuestionEntity> {
    /**
     * 添加问题
     * @param entity
     * @return
     */
    int addQuestion(WebsiteQuestionEntity entity);

    /**
     * 查询问题
     * @param entity
     * @return
     */
    WebsiteQuestionEntity findQuestionInfo(WebsiteQuestionEntity entity);

    /**
     * 更新问题
     * @param entity
     * @return
     */
    int updateQuestionInfo(WebsiteQuestionEntity entity);

    /**
     * 删除问题信息
     * @param entity
     * @return
     */
    int deleteQuestion(WebsiteQuestionEntity entity);

    /**
     * 查询问题数量
     * @param entity
     * @return
     */
    long findQuestionCount(WebsiteQuestionEntity entity);

    /**
     * 查询问题列表
     * @param param
     * @return
     */
    List<WebsiteQuestionEntity> findQuestionList(Map<String,Object> param);
}
